package com.ck.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 房间表(MRoom)表实体类
 *
 * @author ck
 * @since 2020-11-06 15:44:01
 */
@TableName(value = "m_room")
@Data
public class MRoom extends Model<MRoom> {
    /**
     * 房间id
     **/
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 底注
     **/
    @NotNull(message = "底注不能为空")
    private Integer chip;
    /**
     * 房间状态, 0 待开始, 1 进行中, 2 已结束
     */
    private Integer status;
    /**
     * 房主
     **/
    private String owner;
    /**
     * 创建时间
     **/
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    /**
     * 结束时间
     **/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

}
